/**
 * Created by Administrator on 2018/10/29 0029.
 */
//策略servies  直接从后台取得数据  进过socikt进行修改

loginapp.factory('stragegTalbedateService',function(){   //定义公用数据服务 主要用于依赖注入的方式共享表单的数据
    //var objstras={};  //返回一个id为key的dict 这样便于以后的操作
    //stras 来源于control.html date
    for(var i =0;i<stras.length;i++){
//<span ng-class="row.statusClass">{{ row.status }}</span>
        //初始化的时候初始状态
        if(stras[i].Tringstatus=="true"){
            stras[i].status="已启动";
            stras[i].statusClass="label label-success";
        }else{
            if(stras[i].Loadstatus=="true"){
                stras[i].status="已加载";
                stras[i].statusClass="label label-primary";
            }else{
                stras[i].status="未加载";
                stras[i].statusClass="label label-warning";
            }
        }

        stras[i].Position = eval(stras[i].Position)   //修改为对象 便于显示的时候对颜色进行控制
    }
    return stras;
});


//账户servies  需要后台实现加载 这里只做演示数据
loginapp.factory('userinfoTalbedateService',function(){   //定义公用数据服务 主要用于依赖注入的方式共享表单的数据
    // simpleList = [
    //         {"id": 1, "name": "chengcheng", "pass": "***", "qhgs":  '大陆期货',"statusClass":"label label-success","status":"已启动"},
    //         {"id": 2, "name": "xiangke", "pass": "***", "qhgs":  '华泰期货',"statusClass":"label label-success","status":"已启动"},
    //         {"id": 3, "name": "jinjun", "pass": "***", "qhgs":  '弘业期货',"statusClass":"label label-primary","status":"未启动"},
    //         {"id": 4, "name": "dapeng", "pass": "***", "qhgs":  '大陆期货',"statusClass":"label label-primary","status":"未启动"},
    //         {"id": 5, "name": "liming", "pass": "***", "qhgs":  'simnow模拟',"statusClass":"label label-primary","status":"未启动"},
    //         {"id": 6, "name": "zhangshi", "pass": "***", "qhgs":  '弘业期货',"statusClass":"label label-primary","status":"未启动"},
    //         {"id": 7, "name": "adong", "pass": "***", "qhgs":  '华泰期货',"statusClass":"label label-primary","status":"未启动"},
    //         {"id": 8, "name": "656566", "pass": "***", "qhgs":  '中航期货',"statusClass":"label label-primary","status":"未启动"},
    //         {"id": 9, "name": "34344", "pass": "***", "qhgs":  '大陆期货',"statusClass":"label label-primary","status":"未启动"},
    //         {"id": 10, "name": "12121", "pass": "***", "qhgs":  '弘业期货',"statusClass":"label label-primary","status":"未启动"},
    //         {"id": 11, "name": "67867", "pass": "***", "qhgs":  '大陆期货',"statusClass":"label label-primary","status":"未启动"},
    //         {"id": 12, "name": "231213", "pass": "***", "qhgs":  '大陆期货',"statusClass":"label label-primary","status":"未启动"},
    //     ];
    // return simpleList;

    return InvestorSetting

});
